package com.bbs.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class MyUtil {

    public static String createActivateCode() {
        return String.valueOf(new Random().nextInt(899999) + 100000);
    }

    public static String formatDate(Date date) {
        SimpleDateFormat sformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//日期格式
        return sformat.format(date);
    }
}
